package me.ilvc.taotao.service.impl;

import me.ilvc.taotao.dao.TbItemCatDao;
import me.ilvc.taotao.model.TbItemCat;
import me.ilvc.taotao.service.ItemCatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: iLvc
 * @Date：Create in 10:29 2017/8/2
 * @Description:
 * @Modified By:
 */
@Service
public class ItemCatServiceImpl implements ItemCatService {

    @Autowired
    private TbItemCatDao itemCatDao;

    @Override
    public List<TbItemCat> getItemCatList(Long parentId) {
        TbItemCat example = new TbItemCat();
        //设置查询条件
      /*  Criteria criteria = example.createCriteria();
        //根据parentid查询子节点
        criteria.andParentIdEqualTo(parentId);
        //返回子节点列表
        List<TbItemCat> list = itemCatMapper.selectByExample(example);*/
        List<TbItemCat> list =itemCatDao.getItemCatList(parentId);

        return list;

    }
}
